package com.lagou.pojo;

import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;


/**
 * mappedStatement和configuration对象都要向下传递，且一条sql执行语句对应一个mappedstatement对象，分开传递会变得繁琐，
 * 利用面向对象的思想，将mappedstatement作为configuration的参数，传递时只需传递configuration即可。
 */
public class Configuration {
    private DataSource dataSource;

    /**
     * key:statementid    value:封裝好的mappedStatement对象
     */
    Map<String, MappedStatement> mappedStatementMap = new HashMap<String, MappedStatement>();

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }

    public Map<String, MappedStatement> getMappedStatementMap() {
        return mappedStatementMap;
    }

    public void setMappedStatementMap(Map<String, MappedStatement> mappedStatementMap) {
        this.mappedStatementMap = mappedStatementMap;
    }
}
